package com.run_java_test.test3;


import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
public class RegisterController {

    @Autowired
    private DynamicControllerRegistrar dynamicControllerRegistrar;

    @GetMapping("/register")
    public String registerDynamicController() throws Exception {
        dynamicControllerRegistrar.registerControllerFromSource("D:\\test\\com\\run_java_test\\test3\\DynamicController.java");
        return "Dynamic controller registered!";
    }
}